package com.kaigejava.command.command.impl.light;

import com.kaigejava.command.command.ICommandInterface;
import com.kaigejava.command.sdk.LightAPI;

/**
 * Created by kaigejava on 2019/8/30.
 * 关灯的命令对象
 */
public class LightOffCommand  implements ICommandInterface{

    private LightAPI light;

    public LightOffCommand(LightAPI light){
        this.light = light;
    }
    @Override
    public void execute() {
        light.Off();
    }

    @Override
    public void undo() {
        light.On();
    }
}
